<!-- 企业基础资料 -->
<template>
    <div>
        <el-form ref="form" :model="form.addCompanyInfo" :rules="rules.addCompanyInfo" label-width="100px">
            <el-form-item label="企业名称" prop="name">
                <el-input v-model="form.addCompanyInfo.name"></el-input>
            </el-form-item>
            <el-form-item label="企业类型" prop="type">
                <el-select v-model="form.addCompanyInfo.type" placeholder="请选择">
                    <el-option v-for="item in initData.companyTypeList" :label="item.name" :value="item.id" :key="item.id">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="上市情况" prop="upInfo">
                <el-select v-model="form.addCompanyInfo.upInfo" placeholder="请选择">
                    <el-option v-for="item in initData.upInfo" :label="item.name" :value="item.id" :key="item.id">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="经营范围" prop="rangeInfo">
                <el-input v-model="form.addCompanyInfo.rangeInfo"></el-input>
            </el-form-item>
            <el-form-item label="涉及领域" prop="domainInfo">
                <el-checkbox-group v-model="form.addCompanyInfo.domainInfo">
                    <el-checkbox v-for="item in initData.domainInfo" :label="item.label" :key="item.value">{{item.label}}</el-checkbox>
                </el-checkbox-group>
            </el-form-item>
            <el-form-item label="注册资金(万元)" prop="registMoney">
                <el-input v-model="form.addCompanyInfo.registMoney"></el-input>
            </el-form-item>
            <el-form-item label="法人代表" prop="legan">
                <el-select v-model="form.addCompanyInfo.legan" placeholder="请选择">
                    <el-option v-for="item in initData.legan" :label="item.name" :value="item.id" :key="item.id">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="联系人">
                <el-select v-model="form.addCompanyInfo.realtion" placeholder="请选择">
                    <el-option v-for="item in initData.relation" :label="item.name" :value="item.id" :key="item.id">
                    </el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="企业地址" prop="address1">
				<el-cascader :options="initData.address1" v-model="form.addCompanyInfo.address1"></el-cascader>
            </el-form-item>
            <el-form-item label="详细地址" prop="address2">
                <el-input v-model="form.addCompanyInfo.address2" placeholder="详细地址"></el-input>
            </el-form-item>

            <el-form-item label="企业邮箱" prop="email">
                <el-input v-model="form.addCompanyInfo.email"></el-input>
            </el-form-item>
            <el-form-item label="企业电话" prop="phone">
                <el-input v-model="form.addCompanyInfo.phone"></el-input>
            </el-form-item>
            <el-form-item label="企业传真">
                <el-input v-model="form.addCompanyInfo.fax"></el-input>
            </el-form-item>
            <el-form-item label="企业网址">
                <el-input v-model="form.addCompanyInfo.website"></el-input>
            </el-form-item>
        </el-form>
    </div>
</template>

<script>

export default{
	data(){
		return {
			form:{
				addCompanyInfo:{
					name:'',
					type:'',
					upInfo:'',
					rangeInfo:'',
					domainInfo:[],
					registMoney:'',
					legan:'',
					relation:'',
					address1:[],
					address2:'',
					email:'',
					phone:'',
					fax:'',
					website:''

				}
			},
			rules:{
				addCompanyInfo:{
					name:[
						{required:true,message:'请输入企业名称',trigger:'blur'},
					],
					type:[
						{required:true,message:'请选择企业类型',trigger:'change'},
					],
					upInfo:[
						{required:true,message:'请选择上市情况',trigger:'change'},
					],
					domainInfo:[
						{type:'array',required:true,message:'请至少选择一个领域',trigger:'change'},
					],
					legan:[
						{required:true,message:'请选择法人代表',trigger:'change'},
					],
					address1:[
						{required:true,message:'请选择地址',trigger:'change'},
					],
					address2:[
						{required:true,message:'请填写企业地址',trigger:'blur'},
					],
					email:[
						{required:true,message:'请填写企业邮箱',trigger:'blur'},
					],
					phone:[
						{required:true,message:'请填写企业电话',trigger:'blur'},
					]

				}
			},
			initData:{
				type:[],
				upInfo:[],
				domainInfo:[],
				legan:[],
				relation:[],
				address1:[],
			}
		}
	}
}	
</script>


